package com.benyanyi.okhttp.type;

import com.benyanyi.okhttp.call.RequestConfig;
import com.benyanyi.okhttp.download.DownloadConfig;

import java.util.List;
import java.util.Map;

/**
 * @author YanYi
 * @date 2019-08-12 16:09
 * @email ben@yanyi.red
 * @overview
 */
public interface RequestType {

    RequestConfig getText(Map<Object, Object> map);

    RequestConfig postText(Map<Object, Object> headerMap, Map<Object, Object> bodyMap);

    RequestConfig postJson(Map<Object, Object> map);

    RequestConfig postJson(String string);

    RequestConfig xml(String xml);

    RequestConfig file(Map<Object, Object> map);

    RequestConfig file(String... filePaths);

    RequestConfig file(List<String> filePaths);

    DownloadConfig download();

    /**
     * @param isCover 是否覆盖之前的文件
     */
    DownloadConfig download(boolean isCover);

    /**
     * @param suffix 文件名后缀
     */
    DownloadConfig download(String suffix);

    /**
     * @param isCover 是否覆盖之前的文件
     * @param suffix  文件名后缀
     */
    DownloadConfig download(boolean isCover, String suffix);

}
